//
//  CYShareManager.h
//  cyjf
//
//  Created by tauCross on 2017/7/31.
//  Copyright © 2017年 Auto Financing. All rights reserved.
//

#import <Foundation/Foundation.h>



typedef NS_ENUM(NSUInteger, CYShareTarget) {
    CYShareTargetQQ,
    CYShareTargetWechat,
    CYShareTargetWechatTimeLine,
    CYShareTargetWeibo
};

typedef NS_ENUM(NSUInteger, CYShareType) {
    CYShareTypeURL
};



@interface CYShareObject : NSObject

@property(nonatomic, assign)CYShareTarget target;
@property(nonatomic, assign)CYShareType type;
@property(nonatomic, strong)NSString *title;
@property(nonatomic, strong)NSString *url;
@property(nonatomic, strong)NSString *detail;
@property(nonatomic, strong)UIImage *thumb;
@property(nonatomic, strong)NSURL *thumbURL;

@end



@interface CYShareManager : NSObject

+ (instancetype)standardManager;

- (void)shareWithObject:(CYShareObject *)object complete:(void(^)(BOOL succeed, NSString *error))complete;

- (void)handleOpenURL:(NSURL *)url;

@end
